<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
</head>
<body>

    <div id="app2">
        <button type="button" ref="mybtn1" @click="showVueObject">点我</button>
        <button type="button" ref="mybtn2" @click="showVueObject">点我</button>
    </div>

</body>
<script>
    var v2 = new Vue({
        el:"#app2",
        methods:{
            showVueObject:function () {
               this.$refs.mybtn1.innerHTML = "hello, vue"
            }
        }
    })

</script>
</html>